home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / misc / vgadoc3.arj / COMPAQ.TXT < prev    next >
Text File  |  1994-01-18  |  15KB  |  400 lines

  1.     Compaq Super VGA chips.
  2.  
  3. There are 3 "Families" of Compaq VGA chips:
  4.  
  5. Integrated Video Graphics System (IVGS):
  6. Supports 640x480x16c. BitBLT functions
  7.  
  8. Advanced VGA System (AVGA):
  9. Supports 800x600x16c and 640x480x256c. BitBLT functions.
  10.  
  11. QVision:
  12. Supports 1024x768x256c. Newer versions support 1280x1024 and/or TrueColor.
  13. Hardware Cursor, BitBLT.
  14.  
  15.  
  16.  
  17. 3CEh index 0Bh (R/W):
  18. bit    1  If set the ROM is 16bit wide, 8 if clear
  19.        2  If set video memory is 16bit wide, 8 if clear
  20.  
  21. 3CEh index 0Ch (R/W):
  22. bit  3-7  Version.
  23.             03h: IVGS
  24.             05h: AVGA
  25.             06h: QVision 1024
  26.             0Eh: QVision 1280 or 1024
  27.             10h: Advanced VGA Port
  28.  
  29. 3CEh index 0Fh (R/W):  Environment Register
  30. bit  0-3  writing 5 to this register unlocks the extended registers.
  31.      4-7  0Ah if in AVGA mode, 0 if in QVision mode
  32. Note: The QVision has a specific mode for AVGA support (Mode 29h and 2Eh),
  33.       where the AVGA accelerator function and registers are used.
  34.  
  35. 3CEh index 10h (R/W):  BLTConf
  36. bit    2  If set the 2xxxh-3xxxh register block is mapped at 4xxxh-5xxxh
  37.      3-4  Video interrupt. 0= Active Low, 1,3=Active High, 2=Disabled.
  38.        5  Tri-state if set
  39.  
  40. 3CEh index 40h (R/W):  Control Register 0
  41. bit    0  If set accesses to the upper bank (0A8000h-0AFFFFh) are calculated
  42.           from 0A8000h (I.e.. to create a 64K unified window index 46h should
  43.           be programmed with a value 8 larger than index 45h). If clear
  44.           accesses are relative to 0A0000h (I.e.. use same value in index 45h
  45.           and 46h).
  46.  
  47. 3CEh index 42h (R/W):
  48. bit    0  Bit 8 of the Display Offset (3d4h index 13h)
  49.      2-3  Display start offset bit 16-17.
  50.        7  Set in 1280x1024 modes ??
  51.  
  52. 3CEh index 43h (R/W):
  53.  
  54. 3CEh index 45h (R/W):  Page Register 0
  55. bit  0-7  Bank number in 4KB blocks for accesses to A000h-A7FFh.
  56. Note: In the QVision 1280 the bank can be in units of 16KB
  57.  
  58. 3CEh index 46h (R/W):  Page Register 1
  59. bit  0-7  Bank number in 4KB units for accesses to A800h-AFFFh
  60.           If index 40h bit 0 is set this value must be 8 larger than the value
  61.           in index 45h (8*4k = 32k) to provide a 64k unified window. If index
  62.           40h bit 0 is clear this value should be the same as in index 45h.
  63.  
  64. 3CEh index 48h (R/W): 
  65. bit  0-3  High Area Memory (0=disabled, 1-0Eh = the 1MB boundary the HMA
  66.           starts at). The HMA is a 1MB continuos mapping of the video buffer.
  67.      0-7  Lower 8 bits of the HMA start address
  68.  
  69. 3CEh index 49h (R/W):
  70. bit  0-7  Upper 8 bits of the HMA start address
  71.  
  72. 3CEh index 50h
  73. bit  3-6  Monitor (0,2,6??)
  74.              00h  Compaq Internal Monitor
  75.              02h  Compaq 16" Advanced Graphics Color Monitor
  76.              03h  Compaq 1024 Color Monitor
  77.              04h  QVision 200 (20") Color Monitor
  78.              05h  Compaq SVGA Color Monitor
  79.              06h  QVision 150 (15") Color Monitor or
  80.                   Compaq 151 FS Color Monitor
  81.              0Eh  Compaq 14" VGA Monitor (31.5 kHz)
  82.  
  83. 3CEh index 51h (R/W):
  84.  
  85. 3CEh index 54h (R/W):                                           (QVision only)
  86. bit  0-7  Video Memory. 2: 512k, 4: 1024k, 8: 2048k
  87. Note: For the QVision 1024, 0 apparently means 1024KB.
  88.  
  89. 3CEh index 56h (R/W):                                           (QVision only)
  90. bit    2  (R) Set for QVision 1280, clear for QVision 1024
  91.  
  92. 3CEh index 5Ah (R/W):                                           (QVision only)
  93. bit  0-5  1 for copy, 2 for fill
  94.      6-7  Set to 3 or 0 ??
  95.  
  96. 3CEh index 80h (R/W):
  97. bit  2-3  2=Plasma system.
  98.      4-6  Palette option: 1=Standard palette, 2=Option B, 5=option A,
  99.             6=option C.
  100.  
  101. 3CEh index 81h (R/W):
  102. bit   2  Set for Palette option A-C and Standard palette, clear for option D.
  103.  
  104. 13C7h (R/W): 
  105. bit  0-7  Data port for the Hardware Cursor map.
  106.           There are 2 128byte (32x32 bit) maps. Set 3C8h to 0 and then write
  107.           the 128 byte cursor bitmap to this register to load the actual icon.
  108.         . Set 3C8h to 80h and write the 128 byte cursor mask to this register
  109.           to mask any areas not included in the cursor.
  110.  
  111. 13C8h (R/W)
  112. bit  0-7  60h=4bit packed, 40h=8bit packed, 10h=24bit packed, 30h=15bit,
  113.           38h=16bit
  114.  
  115. 13C9h (R/W):
  116. bit   0-1  Set to 2 to enable the Hardware cursor, 0 to disable ??.
  117.       2-7  Always 8 ???
  118.  
  119. 23C0h W(R/W): Source Address                                 (IVGS, AVGA only)
  120. bit  0-15  Address of source in DWORDs (256colors) or bytes (16colors).
  121.            (AVGA) Bit 16-17 are in 23C4h.
  122.            The exact address and size of the BitBLT can be adjusted by
  123.            33C0h,33C1h,33C8h and 33C9h
  124.  
  125. 23C2h (R/W):  Width of area                                  (IVGS, AVGA only)
  126. bit   0-7  Width in DWORDs of the Blit area.
  127.  
  128. 23C2h W(R/W): Width of BitBLT operation                         (QVision only)
  129. bit   0-9  Width of the BitBLT area in pixels
  130.  
  131. 23C4h W(R/W): Height of the BitBLT area
  132. bit   0-9  Number of lines in Blit area.
  133.     10-11  (AVGA) Bit 8-9 of the Scanline Width. Bit 0-15 are in 
  134.     12-13  (AVGA) Bit 16-17 of the distance. Bit 0-15 are in 23CCh.
  135.     14-15  (AVGA) Bit 16-17 of Source address. Bit 0-15 are in 23C0h.
  136.  
  137. 23CAh W(R/W):  Scanline width.                               (IVGS, AVGA only)
  138. bit  0-15  Width of destination in DWORDs (256color) or bytes (16color).
  139.            Negative if moving backwards.
  140.  
  141. 23CCh W(R/W): Destination Address                            (IVGS, AVGA only)
  142. bit  0-15  Distance between the Destination and the Source Address in DWORDs
  143.            (256colors) or bytes (16colors).
  144.            (AVGA) Bit 16-17 are in 23C4h bit 12-13.
  145.  
  146. 23CEh W(R/W):  Scanline width.                               (IVGS, AVGA only)
  147. bit  0-15  Width of destination in DWORDs. Negative if moving backwards.
  148. Note: one must be source and the other destination width
  149.  
  150. 33C0h (R/W):                                                 (IVGS, AVGA only)
  151. bit  0-7  Start pixel of BitBLT source
  152.  
  153. 33C1h (R/W):                                                 (IVGS, AVGA only)
  154. bit  0-7  Ending pixel of BitBLT destination
  155.  
  156. 33C7h (R/W):                                                 (IVGS, AVGA only)
  157.  
  158.  
  159. 33C8h (R/W):                                                 (IVGS, AVGA only)
  160. bit  0-1  
  161. Note: this is the same registers as 3CEh index 3  ??
  162.  
  163. 33C9h (R/W):                                                 (IVGS, AVGA only)
  164.  
  165. 33CAh W(R/W):  Fore/Back ground color ?
  166.  
  167. 33CCh W(R/W):  Fore/Background color
  168. Note: Apparently the Fore/Background color registers must be written twice to
  169.       work properly. 
  170.  
  171. 33CEh (R/W):  COP Status/Command
  172. bit    0  (R) If set the CoProcessor is busy.
  173.      0-5  (W) 11h = Copy. 9 = Fill.
  174.        6  (W) Copy/Fill backwards if set
  175.  
  176. 33CFh (R/W): 
  177.  
  178. 63C0h W(R/W): Source Bitmap X-address                           (QVision only)
  179. bit   0-9  The X co-ordinate of the start of the Source Data.
  180.  
  181. 63C2h W(R/W): Source Bitmap Y-address                           (QVision only)
  182. bit   0-9  The Y co-ordinate of the start of the Source Data.
  183.  
  184. 63CAh (R/W): 
  185. bit   0-2  1=4bit packed, 3=8bit packed, 5= 15bit, 7=24 bit (packed as RGBa)
  186.         6  After loading the BitMap Address and Size registers, wait for this
  187.            bit to be 0 before setting final registers and starting the
  188.            command.
  189.         7  Wait for this bit to be 0, before loading the Source/Destination
  190.            address and BitMap size registers.
  191.  
  192. 63CCh W(R/W): Destination Bitmap X-address                      (QVision only)
  193. bit   0-9  The X co-ordinate of the start of the Destination Data
  194.  
  195. 63CEh W(R/W): Destination Bitmap Y-address                      (QVision only)
  196. bit   0-9  The Y co-ordinate of the start of the Destination Data
  197.  
  198. 83C6h (R/W):
  199. bit     1  If set the DAC is 8bit, if clear 6bit.
  200.  
  201. 83C8h
  202.  
  203. 93C6h W(R/W): Hardware Cursor Y-position
  204. bit   0-9  The X-position of the right pixel of the hardware cursor.
  205.  
  206. 93C8h W(R/W): Hardware Cursor X-position
  207. bit   0-9  The Y-position of the lower scanline of the hardware cursor.
  208.  
  209. Note: Registers 3C6h-3C9h, 13C6h-13C9h, 83C6h-83C9h and 93C6h-93C9h are
  210.       physically in the Brooktree DAC.
  211.  
  212.  
  213.   ID Compaq super VGA:
  214.  
  215.   old:=rdinx($3CE,$F);
  216.   wrinx($3CE,$F,0);
  217.   if not testinx($3CE,$45) then
  218.   begin
  219.     wrinx($3CE,$F,5);
  220.     if testinx($3CE,$45) then
  221.     begin
  222.       SubVers:=rdinx($3CE,$C) shr 3;
  223.       case SubVers of
  224.         3:name:='Compaq IVGS';
  225.         5:name:='Compaq AVGA';
  226.         6:name:='Compaq QVision 1024';
  227.        $E:if (rdinx(GRC,$56) and 4)>0 then name:='Compaq QVision 1280'
  228.                                       else name:='Compaq QVision 1024';
  229.       $10:name:='Compaq AVPort';
  230.       else UNK(Compaq)
  231.       end;
  232.     end;
  233.   end;
  234.   wrinx($3CE,$F,old);
  235.  
  236.  
  237.  
  238.     Video Modes:
  239.     
  240.   22h  T   132x 43
  241.   23h  T   132x 25
  242.   27h  T   132x 50
  243.   28h  T   132x 60
  244.   29h  G   800x 600   16c  PL4
  245.   2Eh  G   640x 480  256c  P8.  Each scan line is 1024 bytes wide.
  246.   32h  G   640x 480  256c  P8   Each scan line is 1024 bytes wide
  247.   33h  G   640x 400  256c  P8   Each scan line is 1024 bytes wide
  248.   34h  G   800x 600  256c  P8   Each scan line is 1024 bytes wide
  249.   37h  G  1024x 768   16c  P4
  250.   38h  G  1024x 768  256c  P8
  251.   39h  G  1280x1024   16c  P4
  252.   3Ah  G  1280x1024  256c  P8   Each scan line is 2048 bytes wide
  253.   3Eh  G   640x 480   32k  P15
  254.   40h  G   640  400     2       Compaq Portable only
  255.   4Dh  G   512x 480   16m  P32  Four bytes per pixel
  256.   4Eh  G   640x 400   16m  P32  Four bytes per pixel
  257.  
  258.  
  259. BitBLTs:
  260.  
  261. There appear to be two different systems: mode 2Eh uses a system based on the
  262. memory address of the bitmaps involved, and with some fields packed.
  263. Is this to keep compatibility with something ??
  264. Mode 32h, 37h and 38h use a system based on the pixel addresses of the bitmaps
  265. Also some of the registers appear to be mapped to more than one address ??
  266. I.e.. drivers some time adds a value to the register address.
  267.  
  268.  
  269.   Compaq BIOS extensions:
  270.  
  271. ----------10BF00-----------------------------
  272. INT 10 - VIDEO - Compaq Portable Extensions - SELECT EXTERNAL MONITOR
  273.         AX = BF00h
  274. Note: all registers preserved and the internal monitor is blanked
  275.       the external monitor becomes the active monitor
  276. ----------10BF01-----------------------------
  277. INT 10 - VIDEO - Compaq Portable Extensions - SELECT INTERNAL MONITOR
  278.         AX = BF01h
  279. Note: all registers preserved and the external monitor is blanked
  280.       the internal monitor becomes the active monitor
  281. ----------10BF02-----------------------------
  282. INT 10 - VIDEO - Compaq Portable Extensions - SET MASTER MODE OF CURRENT CTRLR
  283.         AX = BF02h
  284.         BH = master mode
  285.             04h CGA
  286.             05h EGA
  287.             07h MDA
  288. ----------10BF03BX0000-----------------------
  289. INT 10 - VIDEO - Compaq Portable/Systempro Extensions - GET ENVIRONMENT
  290.         AX = BF03h
  291.         BX = 0000h
  292. Return: BH = active monitor
  293.             00h = external
  294.             01h = internal
  295.         BL = master mode
  296.             00h = switchable VDU not present
  297.             04h = CGA
  298.             05h = EGA
  299.             07h = MDA
  300.             08h = switchable LCD controller present
  301.         CH = 00h (reserved)
  302.         CL = switchable VDU mode supported
  303.             bit    0 = CGA supported
  304.             bits 1,2 = reserved (1)
  305.             bit    3 = MDA supported
  306.             bits 4-7 = reserved (1)
  307.         DH = internal monitor type
  308.             00h = none
  309.             01h = Dual-mode monitor
  310.             02h = 5153 RGB monitor
  311.             03h = Compaq Color monitor
  312.             04h = 640x400 flat panel
  313.             07h = LCD VGA
  314.         DL = external monitor type
  315.             00h = none
  316.             01h = dual-mode monitor
  317.             02h = 5153 RGB monitor
  318.             03h = Compaq Color monitor
  319.             04h = 640x400 flat panel
  320.             05h = VGC monochrome
  321.             06h = VGC color
  322. ----------10BF04-----------------------------
  323. INT 10 - VIDEO - Compaq Portable Extensions - SET MODE SWITCH DELAY
  324.         AX = BF04h
  325.         BH = new state of delay
  326.              00h enabled
  327.              01h disabled
  328. ----------10BF05-----------------------------
  329. INT 10 - VIDEO - Compaq Systempro Extensions - ENABLE/DISABLE DISPLAY
  330.         AX = BF05h
  331.         BH = new state of video
  332.              00h off
  333.              01h on
  334. ----------10BF06-----------------------------
  335. INT 10 - VIDEO - Compaq SLT/286 - READ GRAY SCALE TABLE
  336.         AX = BF06h
  337.         CL = address to be read from grey scale table
  338. Return: AL = bit 3-0 - Value read from grey scale table
  339.         CL = address to be read from grey scale table
  340. ----------10BF07-----------------------------
  341. INT 10 - VIDEO - Compaq SLT/286 - WRITE GRAY SCALE TABLE
  342.         AX = BF07h
  343.         CH = value to write to grey scale table
  344.         CL = address to be written to grey scale table
  345. ----------10BF08-----------------------------
  346. INT 10 - VIDEO - Compaq SLT/286 - WRITE COLOR MIX REGISTERS
  347.         AX = BF08h
  348.         CH = bits 7-4 - Green weight
  349.              bits 3-0 - Blue weight
  350.         CL = bits 7-4 - unused
  351.              bits 3-0 - Red weight
  352. --------b-10BF09-----------------------------
  353. INT 10 - VIDEO - Compaq LTE Lite - ENABLE ???
  354.         AX = BF09h
  355. Return: CF clear
  356. Note: sets bit 6 of port 03CEh index 81h; in some cases also sets index 84h
  357.       to 6Fh and index 83h to 04h
  358. --------b-10BF0A-----------------------------
  359. INT 10 - VIDEO - Compaq LTE Lite - DISABLE ???
  360.         AX = BF0Ah
  361. Return: CF clear
  362. Note: clears bit 6 of port 03CEh index 81h; in some cases also sets index 84h
  363.       to 80h and index 83h to FBh
  364. --------b-10BF0B-----------------------------
  365. INT 10 - VIDEO - Compaq LTE Lite - CHECK WHETHER ??? ENABLED
  366.         AX = BF0Bh
  367. Return: CF clear
  368.         AX = state (0000h disabled, 0001h enabled)
  369. ----------10BF0C------------------------------------
  370. INT 10 - VIDEO - Compaq QVision -
  371.         AX = BF0Ch
  372. Clears I/O port 83C6h bit 1. Select 6bit DAC
  373. ----------10BF0D------------------------------------
  374. INT 10 - VIDEO - Compaq QVision
  375.         AX = BF0Dh
  376. Sets I/O port 83C6h bit 1. Selects 8bit DAC
  377. ----------10BF0E------------------------------------
  378. INT 10 - VIDEO - Compaq QVision -
  379.         AX = BF0Eh
  380. Return: AL = 00h  if 6bit DAC
  381.              01h  if 8bit DAC
  382. ----------10BF0F------------------------------------
  383. INT 10 - VIDEO - Compaq QVision -
  384.         AX = BF0Fh
  385.         BX = HMA start address or 0FFFFh
  386. Return: AX = HMA start address
  387. ----------10BF10------------------------------------
  388. INT 10 - VIDEO - Compaq QVision -
  389.         AX = BF10h
  390. Return: AX = HMA start address in ??
  391. ----------10BF11------------------------------------
  392. INT 10 - VIDEO - Compaq QVision -
  393.         AX = BF11h
  394. Return: AL = BFh
  395.      ES:SI -> 
  396.      ES:DI -> COMPAQ text and date
  397. ----------10BFE0------------------------------------
  398. INT 10 - VIDEO - Compaq QVision  (later models ??)
  399.         AX = BFE0h
  400.